<?php
define("_ROOT", "../");
require_once(_ROOT . 'global.php');
$id = is_numeric($_GET["id"]) ? $_GET["id"]:"";
if (!empty($id)){
	$content = $db->fetch_one_array("select feed_content from {$tablepre}xna_feed where feedid='$id' ");
	echo $content;
	$db->query("update {$tablepre}xna_feed set feed_hits=feed_hits + 1 where feedid=$id");
}

$vote = is_numeric($_GET[vote]) ? $_GET[vote]:"";
$votetime = 1;
if (!empty($vote)){
	if ($_COOKIE['vote'.$vote] == 'pubvote_'.$vote) {
		$row = $db->fetch_one_array("select feed_vote from {$tablepre}xna_feed where feedid=$vote ");
		echo $row["feed_vote"]."|" . _LANG_0128 . "";exit;
	} else {
		setcookie('vote'.$vote, 'pubvote_'.$vote, time() + $votetime*3600);
		$db->query("update {$tablepre}xna_feed set feed_vote=feed_vote + 1 where feedid=$vote ");
		$row = $db->fetch_one_array("select feed_vote from {$tablepre}xna_feed where feedid=$vote ");
		echo $row["feed_vote"]."|" . _LANG_0130;exit;
	}
}
?>